improved speed of merging household function