implement match_password