lof script improvements