Add a var to store the mode for further use