updated linkedlist single direction, tested and fixed some small bugs