updated queries and methods