check status function