refactored by adding globals.sh