base template implementation