added remove record and the new record method returns the record number added(or undef)