created metrics model
can pass json data to front end javascript