I'm guessing 3 is the size of the tuple mentioned in the comment above? Might be nice to make this a constant.