metrics average / ajax functioning