integrated Nosagie's SuperBlock code