implements #1