fixed test_cook