Pets can boost your brain power, study says