added a mode instead of booleans