reorganise status handling.