a bit refactoring and a big TODO list