added some config parameters and removed some debug prints