added current measurement