updated for new result format