casting to float several places