runnable version with block models