add more branchs and a Libray for debugging purpose