add lots of todos and small refactor