finish delete activity function.