fixed turning code