Added tail functionality.