expose turn function, code formatting