add partial refund function and example