added display switching.