added change mode event listener