def reverseArray(data, dqMarker):
    """
    reverses the contents of the array 'data'
    before the spot marked by the int dqMarker
    
    returns the array after reversing it
    """
    print("Reversing array")
    temp = -1
    counter = 0
    
    #iterate through the list until halfway point (not counting dqs)
    #swapping 1st and last to be able to see in reverse order
    while counter < (dqMarker // 2):
        temp = data[counter]
        data[counter] = data[dqMarker - counter - 1]
        data[dqMarker - counter - 1] = temp
        counter += 1
    
    return data