Implements #3.