corrected - float inside function