some query structure in place for serv.js. Untested