a better version of the program but still not completed