adding functional diagram