added provision for cmd line arg reading of wd