Refactoring the status method