add support for modes