seems to work
untested