refactor to one map