synthesises, but is pretty inefficient