some progress on debuging