fix error i returning int value instead of float