added new gradient function test