more refactorings, cont.