added current sensing