Say you buy a stock for $100. Later on it's now worth $200. I sell the stocks, then buy another stock for $200. Do I still have to pay tax for the $100 profit?