refactoring HousePassword answer. better performance.