Added support of multiple groups