Implementing new list algorithm