added a collection class to handle "collections" and it takes care of keeping track of pagination information.