more queries and better formatting