done what was for  TODO, also added javaDoc