user gradient for cost