Added implementation for two words