Changed code to just use one query as apposed to two.