fully working script.  will convert to OO, to reference this when I need a working script cause I know I will pooch things