attempt at using 'global' keyword