create and edit hooks