separate config and controller