refactoring after review