updated queryModel for use with running queries to the database