added expand all button. fixed add unit bug