Added ability to pass in query string instead of element.