stoi() function replaced for atoi() function()