added debug tool