fetch code from simple-blog,just for study