modified the name according to proper naming convention, separate the query from element class