LCP funtion