new arrays
code simplified
unused variables deleted
switch to new code (arrays vozm)