changed float comparison from =0 to = 0.0