fixed stupid bug in third homework