update chapter7 with flatten, split and take