some tiny refactorings