implements #10
implements #7