removed about 70 database queries from the view