added split linked list algorithm