insert query works successfully