added newrelic and refactor