improve selftest functionality
improve selftest functionality