implemented insertRecord