transformation to gem