clear sub table with OrderedDict
put fn compile into own function
add array stuff