add query and add images