Edited the shark driver to allow for one to many query re-writes