sample implementation for client