add function for getting the bounds of a collection