Added function def parseinput