Refactor method to set state to active