Added arrays to store ids