calculating correlation percentages for attributes is now fully working with saving to database