we implemented secure solution in socket connection and RMI