initial version of perl script