implemented recipe logic