fixed lot of bugs by changing from int to float values