added a possible framework for letfn