Changing the return value to float