add method which returns the element
made the grammar creation lazy