replacing rate_prod with profit_table