merge with Vo's work on group2