added casting to float