Why are pulsating variable stars useful for finding distances to globular clusters?