compatibility without globals