works, prining arrays before and after