added DEBUG support