Added turntype detection