copied functions, need to use new string input method and remove extraneous string checks, also use print i function