Rewrite function of lilim, upgrading less from 1.7.4 to 1.7.5