Adjust on add method to accept an array as parameter