add option for global vars (fix #23)