starting to merge some of the server code...