split processMap() into two classes