add bounds checking to flux-on function