doing int instead of float for some gradients ... doesnt really help.
back to float
turned all the helper functions back on