use the right generic buffer type.