refactor v1 and group functions