add some comment and adjust indent