mode can be specified as a string