modified query according to stackoverflow recommendation
added traverse and gremlin calls