changed all casts to direct float values