Tiny element-query like implementation