Added collection as parameter

Other changes:
- Added documentation