fixed program
now works fine