sometimes lappend appends lists inconsistently. separating list building to separate line to fix bad referencing