refactor map out to map factory