reduce redundant codes
avoid recompile when 'make grade'
Merge branch 'master' into lab4
very buggy, part A passed