refactor the code: prepare for blogbook and weibobook