update to querySelector helper function