Edited some queries