Renamed seq to last_seq