added config and improved request mapping