bug with float corrected by adding a precision test for quality comparison