working on record payment func.