implement delete and reverse