changed insert function variable type