fix all the TODOs; all the functionality is implemented