simplified and working on geometry