renamed avg_purchaes to avg_revenue #86