initial current monitor code