Modify record class and add test sample