update for new structure

@jacobawenger 
or null if the inputted key is the first record.