Refactor out lookupSize in example.