fixes #10 and resolves #7