Any reason this couldn't be wrapped into the above loop?