tried to implement insert and copy