I was updating the state incorrectly with the new subset H