add the record function

add the record function