added the code to control the visor