change to use collection, add tests