rough server implementation excluding transfer commands