abstration with templates