minor refactorings / TODOs