add a hook for the server