add delete element
fix and adjust all function to complement add element feature