added argument to function 4 with first local variable
moved sting functions into string lib, function 1 passing to main code
added function 2 to string lib, passing to main code