added raw sql query capability