- tidy up and refactoring