Replaced all previous floatSwitch vairiables with the floatSwitch() function