almost finished with insertion of new item, not very generalized though