small refactoring for status