fixed list processing, now fully supports sublists