modified zigzag test