update new UI, add debug mode