move record.js to its own directory including mongoose