refactor status pattern

refactor status pattern