Tightened solution
Merge pull request #825 from abhinavc/master

Minor edit