match list instead of counting length