added config generation and multiple mapping support