added javadoc comments and removed scale