add a method to check status.