Taken Code from Vaidik and started working