modularize the key outputter