this modification of traverse inserts the input record at the correct place

insertinorder(plistname,pointer)