finish metric functionality.