deleting from a reference list works properly