Surface heterogeneity and contact angle hysteresis