moved planes calc to Plane