optimise iteration by storing contents in a tuple