messin' w/ javascript data structures