Add in enum for modes
Merging in