edit status function