gradient is working for derived features