merge code from trunk

merge code from trunk