This resolves #2 and also resolves #5