refactor immutable collection