added a fit for finding best plane