cross platformify the gradients