Implement getAllWords