refactor to use app config file