correcting minor mistake
shouldn't compare int to double