minor edit to LF func