Added an insert function