begin to implement the hooks