added selftest