refactory and add some marks.