Updated set_state.php to accomodate adding groups