adding metric listener back into code