before trying to save queries to dtabase