macro-ify qqply and qeply