historic insert query added