done todoses and added javadoc