version with null X allowed; still testing