Added DEBUG mode