done  TODOs, also added javaDoc