set working mode