refactoring, added todos