Added update status function