added R# settings
implemented session accept and sending data to server