added header and support to work with config file