slab_extend.py finally works correctly