Array program now fully functional