update quote logic