added baking functionality