closes #294 and also closes #301