initial port of code from sourceforge, with changes for server API