added ability to read configuration from file