more errors and more debug statements