fixed most of the errors.