use a more robust version identification routine