Reduced complexity of the code ,by rewriting main logic with IOOP pattern.