closes #138, closes #139