added insert and set functions