refactor status