updated normals algorithm