implement global variables into SQL creation