implement query actions