tiny code refactoring