rewrite status define code
code refactoring