Refactor the following using the "Extract Method" technique.
function welcomeToTakodanaCastle()
{
while _guests.hasNext()
{
guest = _guests.next();
if(guest.isSmuggler)
{
_maz.says("Are you selling anything today " + guest.name + "?");
if(guest.isSellingSmuggledGoods)
{
_maz.buy(guest.goods);
}
}
else
{
_maz.says("Hello there " + guest.name);
}
}
}