Using an array to keep track of multiple objects