Got the array solution working and tested