write otsu as module