move LF utilities to a new module