begin adding global variables (need for qsort)