Switched from arrays to vectors