tidy split code