more generalize client control script