suggestion from peterbe, check that product/version match before doing other work, also nicer syntax