move common function to module SubtileTool