separate mode and type