refactor general purpose cookbook