fixed normals and wrote javadoc