update of the arrays is done only once (i am starting to get lots of static variables and hidden functions, i guess thats good?