fixes Issue #10 and #11 resolves merge conflicts