Re-written
Merge pull request #684 from abhinavc/master

Re-written