Shouldn't it just be `while interval.ay == ay or interval.by == by`?