small refactorings. works!