mplemented to control the current