updated and refactored recipe