refactoring. added TODOs