initial commit "as is"
lots of waste code, lack of comments,
however it's first working copy of script

some debug print still presents