working over edit price in materials function