pass parameters and scanning the coord file
fixed