little code tidy up