added cmd line arg parsing