changed magic __get method to getQuery method
changed from "queries" property to getQuery method
comment revision
corrected bug in switch statement: added breaks