better root detection