fixed web-server.py function.query to function.ap_query