fixes #18; fixes #19; fixes #20