tidy up, make hooks behave