added collection, function and generic unit test, impl to follow