added turn function