Final version of selftest mod