changed run function to work without config file