refactor Mapping to be based on Stream