add initWithNameAndDefinition method to Word class