Nicely written Srikanth. Simple and easy to understand