collection class. fixes #52