Tail Class Implemented with it's test cases