tuple and string manipulation