made more of the code for the handlers