Made some changes in Run function