Fixed split code and swap example