update controller app: add query func