Should take mode as a second parameter in order to allow forcing a mode like before?