Electrical control of optical properties of monolayer MoS2