some tiny refactoring