add self test procedure