better version matching, resolves #1