Added ranking gradient functionality
successfully merged :)