Merge pull request #1 from ataran/Issue-24-and-27

Issue 24 and 27
Merge pull request #2 from ataran/master

Merge pull request #1 from ataran/Issue-24-and-27