add tests for collect