some changes from svn code base