diff --git a/.github/workflows/ci_push.yml b/.github/workflows/ci_push.yml
index 52bc7d5..635cb1d 100644
--- a/.github/workflows/ci_push.yml
+++ b/.github/workflows/ci_push.yml
@@ -8,7 +8,7 @@ jobs:
     runs-on: ubuntu-latest
     strategy:
       matrix:
-        python-version: [3.8]
+        python-version: [3.8, 3.7]
 
     steps:
     - name: Check out repository
@@ -47,7 +47,7 @@ jobs:
     runs-on: ubuntu-latest
     strategy:
       matrix:
-        python-version: [3.8]
+        python-version: [3.8, 3.7]
 
     steps:
     - name: Check out repository
@@ -85,7 +85,7 @@ jobs:
     runs-on: ubuntu-latest
     strategy:
       matrix:
-        python-version: [3.8]
+        python-version: [3.8, 3.7]
 
     steps:
     - name: Check out repository
@@ -123,7 +123,7 @@ jobs:
     runs-on: macos-latest
     strategy:
       matrix:
-        python-version: [3.8]
+        python-version: [3.8, 3.7]
 
     steps:
       - name: Check out repository
@@ -147,7 +147,7 @@ jobs:
           pip install -e .[test]
 
       - name: Run tests
-        timeout-minutes: 3
+        timeout-minutes: 4
         run: |
           python -m pytest --cov=pyabc --cov-report=xml test/base/test_macos.py
 
@@ -184,7 +184,7 @@ jobs:
         pip install -e .[quality]
 
     - name: Run flake8
-      timeout-minutes: 1
+      timeout-minutes: 2
       run: ./run_flake8.sh
 
     - name: Run pyroma
diff --git a/pyabc/sampler/mapping.py b/pyabc/sampler/mapping.py
index 6db46ad..92c49de 100644
--- a/pyabc/sampler/mapping.py
+++ b/pyabc/sampler/mapping.py
@@ -1,7 +1,7 @@
 import functools
 import random
 
-import dill as pickle
+import cloudpickle as pickle
 import numpy as np
 
 from .base import Sampler
diff --git a/setup.cfg b/setup.cfg
index 9b7e0e3..c14d398 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -53,7 +53,6 @@ install_requires =
     flask >= 1.1.2
     bokeh >= 2.1.1
     redis >= 2.10.6
-    dill >= 0.3.2
     gitpython >= 3.1.7
     scikit-learn >= 0.23.1
     matplotlib >= 3.3.0
@@ -77,7 +76,7 @@ packages = find:
 
 [options.extras_require]
 R =
-    rpy2 >= 3.2.0
+    rpy2 >= 3.3.6
     cffi >= 1.13.1
 petab =
     petab >= 0.1.8

diff --git a/test/base/test_transition.py b/test/base/test_transition.py
index 2aad858..c0632c7 100644
--- a/test/base/test_transition.py
+++ b/test/base/test_transition.py
@@ -265,16 +265,16 @@ def test_discrete_jump_transition():
     def freq(weight):
         return p_stay * weight + p_move * (1 - weight)
 
-    assert 0 < sum(res.a == 5) / n_sample <= p_move + 0.05
-    assert freq(0.45) < sum(res.a == 4) / n_sample < freq(0.55)
-    assert freq(0.15) < sum(res.a == 2.5) / n_sample < freq(0.25)
-    assert freq(0.25) < sum(res.a == 0.5) / n_sample < freq(0.35)
+    assert 0 < sum(res.a == 5) / n_sample <= p_move + 0.1
+    assert freq(0.4) < sum(res.a == 4) / n_sample < freq(0.6)
+    assert freq(0.1) < sum(res.a == 2.5) / n_sample < freq(0.3)
+    assert freq(0.2) < sum(res.a == 0.5) / n_sample < freq(0.4)
 
     # test density calculation
-    assert np.isclose(trans.pdf(pd.Series({'a': 5})), freq(0.))
-    assert np.isclose(trans.pdf(pd.Series({'a': 4})), freq(0.5))
-    assert np.isclose(trans.pdf(pd.Series({'a': 2.5})), freq(0.2))
-    assert np.isclose(trans.pdf(pd.Series({'a': 0.5})), freq(0.3))
+    assert abs(trans.pdf(pd.Series({'a': 5})) - freq(0.)) < 1e-3
+    assert abs(trans.pdf(pd.Series({'a': 4})) - freq(0.5)) < 1e-3
+    assert abs(trans.pdf(pd.Series({'a': 2.5})) - freq(0.2)) < 1e-3
+    assert abs(trans.pdf(pd.Series({'a': 0.5})) - freq(0.3)) < 1e-3
 
 
 def test_discrete_jump_transition_errors():

Cloudpickle >=1.5.0 breaks on python<=3.7
TBD what changed in 1.5.0 https://github.com/cloudpipe/cloudpickle

Also, add a base test on legacy python versions as these are still quite popular.
test/base/test_transition.py::test_rvs_return_type[LocalTransition] test/base/test_transition.py::test_rvs_return_type[MultivariateNormalTransition] test/base/test_transition.py::test_rvs_return_type[SimpleAggregatedTransition] test/base/test_transition.py::test_rvs_return_type[SimpleAggregatedTransition2] test/base/test_transition.py::test_pdf_return_types[LocalTransition] test/base/test_transition.py::test_pdf_return_types[MultivariateNormalTransition] test/base/test_transition.py::test_pdf_return_types[SimpleAggregatedTransition] test/base/test_transition.py::test_pdf_return_types[SimpleAggregatedTransition2] test/base/test_transition.py::test_many_particles_single_par[LocalTransition] test/base/test_transition.py::test_many_particles_single_par[MultivariateNormalTransition] test/base/test_transition.py::test_many_particles_single_par[SimpleAggregatedTransitionSingle] test/base/test_transition.py::test_variance_estimate[LocalTransition] test/base/test_transition.py::test_variance_estimate[MultivariateNormalTransition] test/base/test_transition.py::test_variance_estimate[SimpleAggregatedTransition] test/base/test_transition.py::test_variance_estimate[SimpleAggregatedTransition2] test/base/test_transition.py::test_variance_estimate_higher_n_than_sample[LocalTransition] test/base/test_transition.py::test_variance_estimate_higher_n_than_sample[MultivariateNormalTransition] test/base/test_transition.py::test_variance_estimate_higher_n_than_sample[SimpleAggregatedTransition] test/base/test_transition.py::test_variance_estimate_higher_n_than_sample[SimpleAggregatedTransition2] test/base/test_transition.py::test_variance_no_side_effect[LocalTransition] test/base/test_transition.py::test_variance_no_side_effect[MultivariateNormalTransition] test/base/test_transition.py::test_variance_no_side_effect[SimpleAggregatedTransition] test/base/test_transition.py::test_variance_no_side_effect[SimpleAggregatedTransition2] test/base/test_transition.py::test_particles_no_parameters[LocalTransition] test/base/test_transition.py::test_particles_no_parameters[MultivariateNormalTransition] test/base/test_transition.py::test_particles_no_parameters[SimpleAggregatedTransition] test/base/test_transition.py::test_particles_no_parameters[SimpleAggregatedTransition2] test/base/test_transition.py::test_empty[LocalTransition] test/base/test_transition.py::test_empty[MultivariateNormalTransition] test/base/test_transition.py::test_empty[SimpleAggregatedTransition] test/base/test_transition.py::test_empty[SimpleAggregatedTransition2] test/base/test_transition.py::test_0_particles_fit[LocalTransition] test/base/test_transition.py::test_0_particles_fit[MultivariateNormalTransition] test/base/test_transition.py::test_0_particles_fit[SimpleAggregatedTransition] test/base/test_transition.py::test_0_particles_fit[SimpleAggregatedTransition2] test/base/test_transition.py::test_single_particle_fit[LocalTransition] test/base/test_transition.py::test_single_particle_fit[MultivariateNormalTransition] test/base/test_transition.py::test_single_particle_fit[SimpleAggregatedTransition] test/base/test_transition.py::test_single_particle_fit[SimpleAggregatedTransition2] test/base/test_transition.py::test_single_particle_required_nr_samples[LocalTransition] test/base/test_transition.py::test_single_particle_required_nr_samples[MultivariateNormalTransition] test/base/test_transition.py::test_single_particle_required_nr_samples[SimpleAggregatedTransition] test/base/test_transition.py::test_single_particle_required_nr_samples[SimpleAggregatedTransition2] test/base/test_transition.py::test_two_particles_fit[LocalTransition] test/base/test_transition.py::test_two_particles_fit[MultivariateNormalTransition] test/base/test_transition.py::test_two_particles_fit[SimpleAggregatedTransition] test/base/test_transition.py::test_two_particles_fit[SimpleAggregatedTransition2] test/base/test_transition.py::test_two_particles_required_nr_samples[LocalTransition] test/base/test_transition.py::test_two_particles_required_nr_samples[MultivariateNormalTransition] test/base/test_transition.py::test_two_particles_required_nr_samples[SimpleAggregatedTransition] test/base/test_transition.py::test_two_particles_required_nr_samples[SimpleAggregatedTransition2] test/base/test_transition.py::test_many_particles[LocalTransition] test/base/test_transition.py::test_many_particles[MultivariateNormalTransition] test/base/test_transition.py::test_many_particles[SimpleAggregatedTransition] test/base/test_transition.py::test_many_particles[SimpleAggregatedTransition2] test/base/test_transition.py::test_argument_order[LocalTransition] test/base/test_transition.py::test_argument_order[MultivariateNormalTransition] test/base/test_transition.py::test_argument_order[SimpleAggregatedTransition] test/base/test_transition.py::test_argument_order[SimpleAggregatedTransition2] test/base/test_transition.py::test_score[LocalTransition] test/base/test_transition.py::test_score[MultivariateNormalTransition] test/base/test_transition.py::test_score[SimpleAggregatedTransition] test/base/test_transition.py::test_score[SimpleAggregatedTransition2] test/base/test_transition.py::test_grid_search_multivariate_normal test/base/test_transition.py::test_grid_search_two_samples_multivariate_normal test/base/test_transition.py::test_grid_search_single_sample_multivariate_normal test/base/test_transition.py::test_mean_coefficient_of_variation_sample_not_full_rank[LocalTransition] test/base/test_transition.py::test_mean_coefficient_of_variation_sample_not_full_rank[MultivariateNormalTransition] test/base/test_transition.py::test_mean_coefficient_of_variation_sample_not_full_rank[SimpleAggregatedTransition] test/base/test_transition.py::test_mean_coefficient_of_variation_sample_not_full_rank[SimpleAggregatedTransition2] test/base/test_transition.py::test_discrete_jump_transition test/base/test_transition.py::test_discrete_jump_transition_errors