first version

initial working version of script