closes #49. More work on #50, done with 2).