Refactored Client1