Restructuring: using arrays instead of vectors