adjusted to run with Miabots