work on issue #3: freevars only on nonempty selection