Finding the overall average of nested lists in Scheme?

Hey guys, I'm using MIT Scheme and trying to write a procedure to find the average of all the numbers in a bunch of nested lists, for example:

(average-lists (list 1 2 (list 3 (list 4 5)) 6))) 

Should return 3.5. I've played with the following code for days, and right now I've got it returning the sum, but not the average. Also, it is important that the values of the inner-most lists are calculated first, so no extracting all values and simply averaging them. Here's what I have so far:

(define (average-lists data) (if (null? data) 0.0 (if (list? (car data)) (+ (average-lists (car data)) (average-lists (cdr data))) (+ (car data) (average-lists (cdr data)))))) 

I've tried this approach, as well as trying to use map to map a lambda function to it recursively, and a few others, but I just can't find one. I think I'm making thing harder than it should be. I wrote the following in an effort to pursue some other paths as well, which you may find useful:

(define (list-num? x) ;Checks to see if list only contains numbers (= (length (filter number? x)) (length x))) (define (list-avg x) ;Returns the average of a list of numbers (/ (accumulate + 0 x) (length x)))