updated queries and sidebar