fixed queries and styling