tidy up a method