Make smelting in furnace have a bi-product?

I am wondering if anyone knows how to make smelting something have a bi-product.  like i smelt say, iron ore, with coal, and as a result the iron ore becomes iron, but also the player is given a item.  kinda like a dual output furnace i geuss
first of all can you make it like this?   if(furnacerecipes == ironore) {     additemstack(stone) } elseif(furnacerecipes == mixedmetallingot) {     additemstack(bronzeingot) }   and i mean you can only one drop per item (like this) if(item == ironingot) {     give stone } but you can not make an elseif with iron ingot. Because you can not detect which recipe was the last he used. when the same is the output but the drops are differend.