replace socket connection via rmi calles