modify to return with float