key type as template argument