added percent outage as well. code needs tidying tho