summary function tweaks