Aad cascade recognition and new algoritm to rotate trajectory