mid turn function