adds virtual class grammar