Nearly working (small fault with the char indexes during char swap)