base template functional