Adding Summarize.by function