added CTF mode
merged