what to investigate when buying a home