add some debug codes