added logic for multi column lists