added code from svn repo