deleted unused functions and added javadoc