Feature/add add collection method

separate `addCollection` method and add some tests.