updated queries to reflect schema changes.