Working code regroup