added some basic server functionality, need testing