updated example client to use optional capture