reverted to original gem since there have been too many modifications