add more metrics and fix bug