Bit awkward with all of those karma up/down function but this seems to work well and i was able to dedup a few of the queries