Added check method for repeating words