reset char arrays at end of while loop