fixed queries for profile page and added reference file