Added Historical Query changes