fixes
more refactorings