use globals instead of eval