code tidy-up