actually fixed the turning code