added legends to each section