however, the phalanx did not disappear as a military tactic altogether. there is some question as to whether the phalanx was actually obsolete by the end of its history. in some of the major battles between the roman army and hellenistic phalanxes, such as pydna (168 bc), cynoscephalae (197 bc) and magnesia (190 bc), the phalanx performed relatively well against the roman army, initially driving back the roman infantry. however, at cynoscephalae and magnesia, failure to defend the flanks of the phalanx led to defeat; whilst at pydna, the loss of cohesion of the phalanx when pursuing retreating roman soldiers allowed the romans to penetrate the formation, where the latter's close combat skills proved decisive. the ancient greek historian polybius goes into some detail about the effectiveness of the roman legion against the phalanx. he deduces that the romans refused to fight the phalanx where the phalanx was most effective and offered battle only when they felt that they could exploit the clumsiness and immobility of the phalanx.