what are the factors that affect of cost of production?