test delete and last id