summary debugged and improved. Still need to add summary for melt data.