I wonder if there's a better way we could do this. This seems rather slow.