Modify to work but problem of precision