Eilers-peeters returning minimum values optimized