added a getSize method to return size of list