trying to fix float comparison