add update del fun and optimize