merge save repeated code refactored to recordjs/merge.js