added insert function