getString method returning the input string