Updated to be a little more transparent and take API return into account