added more debug statements