initial implementation of baking functionality