try using properties instead of globals