updating status when you update state