now the detection for also two angles seems working