Refactored code and added comment (both the feature and actual comments
Updating example usage