add TODO and refactor code.