using macro to initiate different modes