fixes #10 and #11
Merge pull request #13 from rohitsw/master

resolves #10 and #11