modified to gem