modified to return info about invalid versions as well