fixes #403, update signature of retrieveConfig to allow for setting things like profiles