move handler create functions to lib/handlers