added freevars check into subst (not working in interpreter)