now with a config file and more variables