fix return type for updateState