more code tidy