implement base template