start working on the expandable list algorithm