Added a simple function
Added error handling
Merge pull request #1 from dvasudevan77/Feature1

Added a simple function