error fixing is almost done