update to the $result array