Added self-test