factors to consider when investing in real estate