example for API for immutable collections