small refactoring, updated todo