adding column group_id to bmps and function set group id