beginning to fix the errors