history base code template