fixed average system syntax errors