implement status function