initial code for element-query