code cleanup + added cookbook