better comment and few improvement