added pulse counter