imported from http://baserver.googlecode.com/svn