changed our program to now malloc arrays