resolves #87 and #77