#2 code from SVN defs