synced with scgiclient example