lp graph function added