Add sub gradient method