bounds checking for controllers