floating point exception corrected