rearranged client end
restructure for windows client