Added first derivative penalty option