backup commit

changing from separate scripts to libraries of functions