change signature of insert and delete to make the implementation easier