tried to fix the erors but failed miserably