refactor
Fix merge and read record