more reworks! now the arrays are in classref, easily modifiable