formatting key and panel