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

Issue 24 and 27