code refactor & add exampleSentence function