change curr and tail variables