This contract seems wrong -- the second return value is a list of 3-element lists.