#2 code from SVN build