put characters in order