reimplementing minor selftest changes