change id generation func; deleted prior records if not compatible with current system