Implemented the insertion and delete functionality