latest code for secure client