refactoring tidying