Made changes to allow program to work