implement load contacts from template function