modified insert query