corrected program structure client