adding correct elems to copy
splitting insert from monad and adding extraction