further refactoring/optimization