better map type matching