adapt contacts sample to template