added letrec and append