implement turn function