PEL working with smoothness. Needs optimization