added interface to communicate with server