changed the ParseConfig to accept a param to make it more reusable