modified gem source