rb solution to stockPrices