complying with formating guides
added javadocs