rewrote the program again, still having the same issue