simplify the program...still crashes