tail reference and addLast method added