modify so that local input files could be used