works for 6 cases, correct lst length change in runtime