refactor from multiple maps to one map