updating insert functions