Could this use an iterator?