Now works with cyclic list