made code modifications after grading meeting