changed insert query