output key correctly