bit of a code tidy up