code formatting
Added javadoc