for issue #25 (gid -> rid)