updated badge queries