rewrite qualified variables as calls - closes #4