calculateGrid second version, fourcorners updated
findcorner