fix dashboard
Refactor concection Avg
change var connection