container stride algorithm and tests