fixed bug in reimburse function