rebuilt loop for (for x y z) to output correct queries
updating gem version