add self-test