updated to cover a corner case
Merge branch 'master' of https://github.com/sreesurendran/codesnippets