closes #390 and closes #417