updated old grammar code