various modification to have easier debug