Updated so the program workes