event query working