add DEBUG support, etc.