better support for modes