Variable stars close to deep sky objects