fixing badcode