added self logging