adding remove duplicate chars; reverse a string