fix bugs for assignment one