fixing bad programming