moved mapping configuration code to code