initial commit of working script (sans config params)