fixed almost all TODOs