use int8_t for mode of operation