added switch statements to processQuery for new access functions