Tail function is now working.