finished string manipulation exercise