minor code tidy