using [] operator to push into array