updated js for floats