optimization, refactoring