refactor the user to book relationships code