new version with xml config file