start of map replacement (for rules and space)