added bidirectional client/server communication