implemented tman gradient