Why do you change from stdClass to array here ?