added edit amount function