Capital gains tax on real estate: what you need to know