an improvement on reverse linked list