added error checking into buying quotes