basic string manipulation and file IO example