corrected the code to store stock data.