bounds checking, started on setSquare