fixed the deletion of existing code