Added the functionality for the tail