basic template abstraction