add some comment and modify the code structure
use a efficient func to get appproval history
add efficient appproval history