Implemented inserting and retrieving from middle