code optimized

subscription logic complete
Merge pull request #2 from CoreCoders/rutvik

code optimized