basic template mechanism