added the portaltable function,improved the documentation,fixed some bugs