removed more unsed functions
fixed delete case