refactoring status updating