added a lot of doc and normalized header?