Added the ability to supply a callback function to the tail method