Bux fixing and added partial parameter passing to finalfn