Setup insert function