some refactoring / TODOs