added protocol function for client