implements #2