implements #6