Added insert function