compute normals needs checking but should work, added comments throughout