move foundation code from weiboApp