added the old code that previously lived in the subversion repo