format the code and add function to deal with response
Merge remote-tracking branch 'origin/master'