added debug statements